package ex.vo;

import java.io.Serializable;
import java.util.Objects;

public class PersonCard implements Serializable {
    public Person person;
    public Card card;

    public PersonCard() {
    }

    public PersonCard(Person person, Card card) {
        this.person = person;
        this.card = card;
    }

    @Override
    public String toString() {
        return "PersonCard{" +
                "person=" + person.toString() +
                ", card=" + card.toString() +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PersonCard that = (PersonCard) o;
        return Objects.equals(person, that.person) &&
                Objects.equals(card, that.card);
    }

}
